// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PROD_MTRL_SCRAP
// * CreateDate    : 2014-06-05 18:30:20
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:20
// * LastChanger   : 2014-06-05 18:30:20
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class ProdMtrlScrapEntity : EntityBase
    {
        public ProdMtrlScrapTable TableSchema
        {
            get
            {
                return ProdMtrlScrapTable.Current;
            }
		}
		
		public ProdMtrlScrapEntity()
        {

        }
		
		public ProdMtrlScrapEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["Id"]));
			this.ScrapNo = Convert.ToString(CommonFunctions.ToObject(dr["Scrap_No"]));
			this.WoNo = Convert.ToString(CommonFunctions.ToObject(dr["Wo_No"]));
			this.ProdCode = Convert.ToString(CommonFunctions.ToObject(dr["Prod_Code"]));
			this.ProdName = Convert.ToString(CommonFunctions.ToObject(dr["Prod_Name"]));
			this.ScrapType = Convert.ToString(CommonFunctions.ToObject(dr["Scrap_Type"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_Date"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["Updated_Date"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["Updated_By"]));
			this.RelatedNo = Convert.ToString(CommonFunctions.ToObject(dr["Related_No"]));
			this.Status = Convert.ToInt32(CommonFunctions.ToObject(dr["Status"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["Is_Active"]));
        }
		
		public ProdMtrlScrapEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["Id"]));
			this.ScrapNo = Convert.ToString(CommonFunctions.ToObject(dr["Scrap_No"]));
			this.WoNo = Convert.ToString(CommonFunctions.ToObject(dr["Wo_No"]));
			this.ProdCode = Convert.ToString(CommonFunctions.ToObject(dr["Prod_Code"]));
			this.ProdName = Convert.ToString(CommonFunctions.ToObject(dr["Prod_Name"]));
			this.ScrapType = Convert.ToString(CommonFunctions.ToObject(dr["Scrap_Type"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_Date"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["Updated_Date"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["Updated_By"]));
			this.RelatedNo = Convert.ToString(CommonFunctions.ToObject(dr["Related_No"]));
			this.Status = Convert.ToInt32(CommonFunctions.ToObject(dr["Status"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["Is_Active"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return ProdMtrlScrapTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(ProdMtrlScrapTable.C_Id)); }
            set { SetData(ProdMtrlScrapTable.C_Id, value); }
        }
		
        [DataMember]
        public string ScrapNo
        {
            get { return Convert.ToString(GetData(ProdMtrlScrapTable.C_Scrap_No)); }
            set { SetData(ProdMtrlScrapTable.C_Scrap_No, value); }
        }
		
        [DataMember]
        public string WoNo
        {
            get { return Convert.ToString(GetData(ProdMtrlScrapTable.C_Wo_No)); }
            set { SetData(ProdMtrlScrapTable.C_Wo_No, value); }
        }
		
        [DataMember]
        public string ProdCode
        {
            get { return Convert.ToString(GetData(ProdMtrlScrapTable.C_Prod_Code)); }
            set { SetData(ProdMtrlScrapTable.C_Prod_Code, value); }
        }
		
        [DataMember]
        public string ProdName
        {
            get { return Convert.ToString(GetData(ProdMtrlScrapTable.C_Prod_Name)); }
            set { SetData(ProdMtrlScrapTable.C_Prod_Name, value); }
        }
		
        [DataMember]
        public string ScrapType
        {
            get { return Convert.ToString(GetData(ProdMtrlScrapTable.C_Scrap_Type)); }
            set { SetData(ProdMtrlScrapTable.C_Scrap_Type, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(ProdMtrlScrapTable.C_CREATED_Date)); }
            set { SetData(ProdMtrlScrapTable.C_CREATED_Date, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(ProdMtrlScrapTable.C_CREATED_BY)); }
            set { SetData(ProdMtrlScrapTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime UpdatedDate
        {
            get { return Convert.ToDateTime(GetData(ProdMtrlScrapTable.C_Updated_Date)); }
            set { SetData(ProdMtrlScrapTable.C_Updated_Date, value); }
        }
		
        [DataMember]
        public string UpdatedBy
        {
            get { return Convert.ToString(GetData(ProdMtrlScrapTable.C_Updated_By)); }
            set { SetData(ProdMtrlScrapTable.C_Updated_By, value); }
        }
		
        [DataMember]
        public string RelatedNo
        {
            get { return Convert.ToString(GetData(ProdMtrlScrapTable.C_Related_No)); }
            set { SetData(ProdMtrlScrapTable.C_Related_No, value); }
        }
		
        [DataMember]
        public int Status
        {
            get { return Convert.ToInt32(GetData(ProdMtrlScrapTable.C_Status)); }
            set { SetData(ProdMtrlScrapTable.C_Status, value); }
        }
		
        [DataMember]
        public int IsActive
        {
            get { return Convert.ToInt32(GetData(ProdMtrlScrapTable.C_Is_Active)); }
            set { SetData(ProdMtrlScrapTable.C_Is_Active, value); }
        }
		
		#endregion
	}
	
	
}	

